<div ng-controller="rolebyController">   
<!--<div ng-controller="userRoleDetailsController">-->	
<!-- contain BEGIN -->
     <div class="right-product right-full background-input animate-time" ng-class="{ true: 'right-full', false: 'right-off' }[isActive]">
               <div class="center-back right-back">
                	<ul class="breadcrumb">
		                <li>
		                	<a href="#">
		                        <img class="breadcrumb-right-img-home" height="20px" src="../images/right-product/home.png">首页
		                   </a>   
		                </li>
		                 <li>
                    		<img class="breadcrumb-right-img"src="../images/public/right4.png">
               			 </li>
		                <li>
		                    <a href="#">角色管理</a>
		                </li>
		                 <li>
                    		<img class="breadcrumb-right-img"src="../images/public/right4.png">
               			 </li>
		                <li>
		                    <a href="#" class="active">角色管理</a>
		                </li>
            		</ul>
            		<div class="button-group">
                                    <!--<button type="button" class="btn btn-default" ng-click="newlyAdded($event,$index)" data-toggle="modal" data-target="#newlyAdded">
                                        <span class="glyphicon glyphicon-plus" ></span> 新增
                                    </button>-->
                                    <button type="button" class="btn btn-default" data-toggle="modal" data-target="#add">
                                        <span class="glyphicon glyphicon-plus" ></span> 新增
                                    </button>
                                    <button type="button" class="btn btn-default btn-md yellow" ng-click="deletes($event, $index)" >
                                    	<span class="glyphicon glyphicon-trash"></span>  
                                   		 批量删除
                               		 </button>
                                    <div class="input-group pull-right search-width">
	                                    <input type="text" class="form-control search-input" placeholder="请输入需要检索的内容" ng-model="role_search">
	                                    <span class="input-group-addon search-btn">
	                                    	<img src="../images/right-product/search.png">检索
	                                    </span>
                               		 </div>
                             </div>
                    <div class="container-fluid">
                        <div class="info-center">
                            
                   			 
							 <div class="contain">
                                
                            <div class="clearfix"></div>
                            <div class="table-margin">
                            	<div class="table-header">
	                                <table class="table table-bordered table-header">
	                                    <thead>
	                                        <tr>
	                                        	<td class="w5 text-center">
	                                            	<input type="checkbox" ng-model="master" ng-click="all(tabVal)" ng-checked="rolesisSelected(val.roleGroupId,val)">
	                                       		 </td>
												<td class="w5 text-left">序号</td>
	                                            <td class="w30 text-left">角色名称</td>
	                                            <td class="w10 text-left">角色组</td>
	                                            <td class="w10 text-left">自动分配</td>
	                                            <td class="w30 text-left">描述</td>
	                                            <td class="w10 text-left">操作</td>
	                                        </tr>
	                                    </thead>
	                                </table>
	                            </div> 
	                            <div class="table-body">
	                                <table class="table table-bordered table-header overflow-table no-border">
	                                	<tbody>
	                                        <tr ng-repeat="val in tabVal |orderBy:b+a | filter:role_search" ng-class="{'active':$index%2!=0}">
	                                        	<td class="w5 text-center">
	                                            	<input type="checkbox" ng-model="userscheck" id={{val.roleId}} ng-checked="rolesisSelected(val.roleId,val)" ng-click="rolesupdateSelection($event,val.roleId,tabVal)">
	                                        	</td>
	                                            <!--<td class="text-center">{{ val.roleId }}</td>-->
	                                            <td class="w5 text-left" >{{ $index}}</td>
	                                            <td class="w30 text-left">
	                                            	<!--{{ val.roleName }}-->
	                                            	<input type="text" class="form-control" selectline ng-model="tabVal[$index].roleName"  ng-change = "role_focus($index)">
	                                            </td>
	                                            <td class="w10 text-left">
	                                            	<select ng-model="tabVal[$index].roleGroupId" ng-options="o.id as o.roleGroupName for o in roleGroupList" ng-change="role_focus($index)">
				                                		<option value="">未选择</option>
				                                	</select>
	                                            </td>
	                                            <td class="w10 text-left">
	                                            	<!--{{ val.autoAssignment }}-->
	                                            	<!--<div  ng-show="val.autoAssignment == 1">是</div>
	                                        		<div  ng-show="val.autoAssignment == 0">不是</div>-->
	                                      
						                               <select ng-model="tabVal[$index].autoAssignment" ng-options="o.id as o.name for o in autoAssignmentList" ng-change="role_focus($index)">
						                                	<option value="">未选择</option>
						                               </select>
				                           	
	                                            </td>
	                                            <td class="w30 text-left">
	                                            	<!--{{ val.description }}-->
	                                            	<input type="text" class="form-control" selectline ng-model="tabVal[$index].description"  ng-change = "role_focus($index)">
	                                            </td>
	                                            <td class="w10 text-center icon-td">
	                                                <span class="btn-i border-none" title="关联用户"  ng-click="setroleId($event, $index)">
							                            <img width="23px" src="../images/right-product/user-one.png">
							                        </span>
							                  		<span class="btn-i border-none" title="所辖用户" ng-click="permissionAssignment($index)">
							                            <img width="20px" src="../images/right-product/user.png">
							                        </span>
								                    <span class="btn-i" title="详情" ng-click="details($index)" >
							                            <img width="14px" src="../images/right-product/view.png">
							                        </span>
							                        <!--<span class="btn-i" title="修改"  ng-click="edit($event, $index)" >
							                            <img width="14px" src="../images/right-product/edit.png">
							                        </span>                              -->
	                                            </td>
	                                        </tr>
	                                        <tr>
	                                   		 	<td colspan="12" class="text-center" ng-hide="isNoData">暂无数据</td>
	                               			</tr>
	                                    </tbody>
	                                </table>
	                            </div>    
                            </div>
                            </div>
                        </div>
                    	<div class="info-bottom">
	            			<div  ng-include="'public/tfoot.html'"></div>
	            		</div>  
                    </div>
                </div>
            </div>
 <!-- contain END -->
<!--add-->
<div  ng-include="'user/role/add.html'"></div>
<!--add end-->        
 
<!-- 详情 BEGIN -->
 <div  ng-include="'user/role/details.html'"></div>    
<!-- 详情 END -->

<!-- 角色关联 BEGIN -->
<div  ng-include="'user/role/roleby.html'"></div>  
<!-- 角色关联  END -->

<!-- 删除 BEGIN -->
<div  ng-include="'user/role/delete.html'"></div>       
<!-- 删除 END -->
<!--</div>-->      
<div  ng-include="'user/role/permissionAssignment.html'"></div>  
</div>